Integrand size = 35, antiderivative size = 120 \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{(a+a \cos (c+d x))^{3/2}} \, dx=\frac {(A+3 B-7 C) \text {arctanh}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \cos (c+d x)}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {(A-B+C) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}+\frac {2 C \sin (c+d x)}{a d \sqrt {a+a \cos (c+d x)}} \]
[Out]
Time = 0.18 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {3098, 2830, 2728, 212} \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{(a+a \cos (c+d x))^{3/2}} \, dx=\frac {(A+3 B-7 C) \text {arctanh}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {(A-B+C) \sin (c+d x)}{2 d (a \cos (c+d x)+a)^{3/2}}+\frac {2 C \sin (c+d x)}{a d \sqrt {a \cos (c+d x)+a}} \]
[In]
[Out]
Rule 212
Rule 2728
Rule 2830
Rule 3098
Rubi steps \begin{align*} \text {integral}& = \frac {(A-B+C) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}-\frac {\int \frac {-\frac {1}{2} a (A+3 B-3 C)-2 a C \cos (c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx}{2 a^2} \\ & = \frac {(A-B+C) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}+\frac {2 C \sin (c+d x)}{a d \sqrt {a+a \cos (c+d x)}}+\frac {(A+3 B-7 C) \int \frac {1}{\sqrt {a+a \cos (c+d x)}} \, dx}{4 a} \\ & = \frac {(A-B+C) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}+\frac {2 C \sin (c+d x)}{a d \sqrt {a+a \cos (c+d x)}}-\frac {(A+3 B-7 C) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{2 a d} \\ & = \frac {(A+3 B-7 C) \text {arctanh}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \cos (c+d x)}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {(A-B+C) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}+\frac {2 C \sin (c+d x)}{a d \sqrt {a+a \cos (c+d x)}} \\ \end{align*}
Time = 0.56 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.69 \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{(a+a \cos (c+d x))^{3/2}} \, dx=\frac {(A+3 B-7 C) \text {arctanh}\left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \cos \left (\frac {1}{2} (c+d x)\right )+(A-B+5 C+4 C \cos (c+d x)) \tan \left (\frac {1}{2} (c+d x)\right )}{2 a d \sqrt {a (1+\cos (c+d x))}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(333\) vs. \(2(103)=206\).
Time = 11.06 (sec) , antiderivative size = 334, normalized size of antiderivative = 2.78
method | result | size |
default | \(\frac {\sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (A \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) \sqrt {2}\, \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +3 B \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) \sqrt {2}\, \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -7 C \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +8 C \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+A \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-B \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}+C \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\right )}{4 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{\frac {5}{2}} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d}\) | \(334\) |
parts | \(\frac {A \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (\sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\right )}{4 a^{\frac {5}{2}} \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d}+\frac {B \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (3 \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\right )}{4 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{\frac {5}{2}} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d}+\frac {C \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-7 \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+8 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {2}\, \sqrt {a}+\sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\right )}{4 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{\frac {5}{2}} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d}\) | \(453\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.61 \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{(a+a \cos (c+d x))^{3/2}} \, dx=-\frac {\sqrt {2} {\left ({\left (A + 3 \, B - 7 \, C\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (A + 3 \, B - 7 \, C\right )} \cos \left (d x + c\right ) + A + 3 \, B - 7 \, C\right )} \sqrt {a} \log \left (-\frac {a \cos \left (d x + c\right )^{2} + 2 \, \sqrt {2} \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) - 3 \, a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - 4 \, {\left (4 \, C \cos \left (d x + c\right ) + A - B + 5 \, C\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{8 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}} \]
[In]
[Out]
Timed out. \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{(a+a \cos (c+d x))^{3/2}} \, dx=\text {Timed out} \]
[In]
[Out]
Timed out. \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{(a+a \cos (c+d x))^{3/2}} \, dx=\text {Timed out} \]
[In]
[Out]
Exception generated. \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{(a+a \cos (c+d x))^{3/2}} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Timed out. \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{(a+a \cos (c+d x))^{3/2}} \, dx=\int \frac {C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )+A}{{\left (a+a\,\cos \left (c+d\,x\right )\right )}^{3/2}} \,d x \]
[In]
[Out]